package com.LeeCode;

/**
 * 转换成小写字母
 */

public class Code709 {
    public static void main(String[] args) {
        String s = "HELLO";
        System.out.println(new Code709().toLowerCase(s));
    }

    public String toLowerCase(String s) {
        StringBuilder sb = new StringBuilder();
        for(int i = 0; i < s.length(); i++) {
            char c = s.charAt(i);
            if('A' <= c && c <= 'Z') {
                sb.append((char)(c+32));
            }else{
                sb.append(c);
            }

        }
        return sb.toString();
    }
}
